{% extends 'base.html' %}
{% block app_content %}
    <table width="100%  " height="100" border="0" align="center"
           cellpadding="0"
           cellspacing="0" bgcolor="#FFFFFF">
        <tr>
            <td align="center" valign="top">
                <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td colspan="4">
                            <hr style=" height:1px;border:none;border-top:1px dotted #185598;"/>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" align="right">&nbsp;</td>
                        <td width="10"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_left.gif') }}">
                        </td>
                        <td width="1075" align="center"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_mid.gif') }}"
                            class="word_white"><b>硬件设备列表</b></td>
                        <td width="10"
                            background="{{ url_for('static',filename='admin/images/manage_leftTitle_right.gif') }}">
                        </td>
                        <td>&nbsp;</td>
                    </tr>
                    <table style="font-size:15px;" width="96%" height="192"
                           border="0" cellpadding="0"
                           cellspacing="0">
                        <tr>
                            <td valign="top">
                                <table
                                        width="100%" height="50" border="1"
                                        cellpadding="0" cellspacing="0"
                                        bordercolor="#FFFFFF"
                                        bordercolordark="#FFFFFF"
                                        bordercolorlight="#E6E6E6">
                                    <tr bgcolor="#eeeeee">
                                        <td width="7%" align="center">id</td>
                                        <td width="32%" align="center">硬件设备名称
                                        </td>
                                        <td width="32%" align="center">taskid信息
                                        </td>
                                    </tr>
                                    {% for hardware in page_data.items %}
                                        <tr style="padding:5px;">
                                            <td height="27" align="center">
                                                {{ hardware.id }}
                                            </td>
                                            <td align="center">{{ hardware.hardware }}</td>

                                            <td align="center">
                                                <a href="/hardware/{{ hardware.hardware}}">查看taskid信息</a>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </table>
                                {% if page_data %}
                                    <tbody>
                                        <tr>
                                            <td height="30" align="right">
                                                当前页数：[{{ page_data.page }}/{{ page_data.pages }}]&nbsp;
                                                    <a href="{{ url_for('home.get_hardware',page=1) }}">第一页</a>
                                                {% if page_data.has_prev %}
                                                    <a href="{{ url_for('home.get_hardware',page=page_data.prev_num) }}">上一页</a>
                                                {% endif %}
                                                {% if page_data.has_next %} 　
                                                    <a href="{{ url_for('home.get_hardware',page=page_data.next_num) }}">下一页</a>
                                                {% endif %}　
                                                    <a href="{{ url_for('home.get_hardware',page=page_data.pages) }}">最后一页&nbsp;</a>
                                            </td>
                                        </tr>
                                    </tbody>
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                    </td>
                </table>
            </td>
        </tr>
    </table>
{% endblock %}
